package com.fjut.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fjut.mapper.CourseDescriptionMapper;
import com.fjut.model.vod.CourseDescription;
import com.fjut.service.CourseDescriptionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import static com.fjut.dateBase.CourseDescriptionField.COURSE_ID;


/**
 * <p>
 * 课程简介 服务实现类
 * </p>
 *
 * @author DengTianxun
 * @since 2023-03-06
 */
@Service
public class CourseDescriptionServiceImpl extends ServiceImpl<CourseDescriptionMapper, CourseDescription> implements CourseDescriptionService {

    @Override
    public void removeCourseDescriptionByCourseId(Long id) {
        QueryWrapper<CourseDescription> wrapper = new QueryWrapper<>();
        if (id == null) {
            return;
        }
        wrapper.eq(COURSE_ID,id);
        baseMapper.delete(wrapper);
    }
}
